DEFINITION MODULE ToolManagerD; (*$ Implementation:=FALSE *)



(*
 * libraries/toolmanager.h  V2.1
 *
 * shared library include file
 *
 * (c) 1990-1993 Stefan Becker
 *)

(*
 * M2Amiga Modula-2 declaration
 *
 * (FreeWare) 1993 JOW
 *
 * If you encounter any problems with these, please contact me at
 *   jow@sun.rz.uni-wuerzburg.de  or  jow@hcast.franken.de
 *)

IMPORT UD:UtilityD;
IMPORT ID:IntuitionD;
IMPORT S:SYSTEM;



CONST
  tmName="toolmanager.library";



(* ToolManager Object Types
TYPE
  TMObjType=(otExec,otImage,otSound,otMenu,otIcon,otDock,otAccess);
*)
CONST
  otExec  =0;
  otImage =1;
  otSound =2;
  otMenu  =3;
  otIcon  =4;
  otDock  =5;
  otAccess=6;



(* internal handle structure, PRIVATE *)
TYPE
  TMHandlePtr=S.ADDRESS;



(* ToolManager Object Properties (see Object.doc) *)

  (* Type: TMOBJTYPE_EXEC *)
  OTExecTags=
    (opArguments:=UD.tagUser+1,
     opCommand,       (* Also used for TMOBJTYPE_SOUND    *)
     opCurrentDir,
     opDelay,
     opExecType,
     opHotKey,        (* Also used for TMOBJTYPE_DOCK     *)
     opOutput,
     opPath,
     opPriority,
     opPubScreen,     (* Also used for TMOBJTYPE_DOCK *)
     opStack,
     opToFront);

  (* Type: TMOBJTYPE_IMAGE *)
  OTImageTags=
    (opFile:=UD.tagUser+257,
     opData);

  (* Type: TMOBJTYPE_SOUND *)
  OTSoundTags=
    (opPort:=UD.tagUser+513);

  (* Type: TMOBJTYPE_MENU/ICON *)
  OTMenuIconTags=
    (opExec:=UD.tagUser+769,
     opSound);

  (* Type: TMOBJTYPE_ICON *)
  OTIconTags=
    (opImage:=UD.tagUser+1025,
     opShowName);

  (* Type: TMOBJTYPE_ICON/DOCK *)
  OTIconDockTags=
    (opLeftEdge:=UD.tagUser+1281,
     opTopEdge);

  (* Type: TMOBJTYPE_DOCK *)
  OTDockTags=
    (opActivated:=UD.tagUser+1536,
     opCentered,
     opColumns,
     opFont,
     opFrontMost,
     opMenu,
     opPattern,
     opPopUp,
     opText,
     opTitle,
     opTool,
     opVertical,
     opBackdrop,
     opSticky);

  (* Type: TMOBJTYPE_ACCESS *)
  (* None defined yet... OTAccessTags=... *)


(* Types for TMOP_ExecType *)
(* ---
   TYPE
     ExecTypes=(etCLI,etWB,etARexx,etHook);
   --- *)

CONST
  etCLI    =  0;
  etWB     =  1;
  etARexx  =  2;
  etDock   =  3;
  etHotKey =  4;
  etNetwork=  5;
  etHook   =100;


(* Data structures for storing image sequences (tmotImage/tmopData)        *)
(* TMImageNode contains the data for ONE picture. Several nodes are joined *)
(* into a single-linked chain via TMImageNode.next                         *)
TYPE
  TMImageNodePtr=POINTER TO TMImageNode;
  TMImageNode=
    RECORD
      next: TMImageNodePtr;     (* pointer to next node *)
      data: S.ADDRESS;          (* MEMF_CHIP memory!!   *)
    END;



(* TMImageData contains information about the image data, like sizes etc.   *)
(* You MUST initialize BOTH Image structures and they MUST BE identical     *)
(* except for the ImageData pointer. normal.ImageData should point to       *)
(* an image data which shows the inactive state and selected.ImageData      *)
(* should point to an image which shows the active state.                   *)
TYPE
  TMImageData=
    RECORD
      normal: ID.ImagePtr;      (* inactive state       *)
      selected: ID.ImagePtr;    (* active state         *)
      data: TMImageNodePtr;     (* chain of images      *)
    END;



END ToolManagerD.def
